import torch
# loose_r_loss = 0.5 * tf.reduce_mean(tf.square(tf.norm(embedding, axis=1) - r))

emd = torch.FloatTensor(10, 1024)
emd = torch.autograd.Variable(emd)

print torch.mean((torch.norm(emd, p=2,dim=1)-40)*(torch.norm(emd, p=2,dim=1)-40))